#ifndef GLSHOW_H
#define GLSHOW_H

#include <GL/glut.h>



namespace IMG_Depth{
	class GLShow{
	public:
		GLShow(int* argc, char** argv);
		void setWindowSize(int, int);
		void setWindowPosition(int, int);
		void setWindowName(char *);
		void setDisplayFunc(void(*)(void));
		void setIdleFunc(void(*)(void));
		void setReshapeFunc(void(*)(void));
		void setKeyboardFunc(void(*)(unsigned char, int, int));

		void run();
		int Load(char *filename);
		void Draw();
	private:
		static void displayFunc(void);
		void idleFunc();
		void reshapeFunc();
		static void keyboardFunc(unsigned char, int, int);
		void renderInit();
		static int writeToBMP(unsigned char *pixarr, int xsize, int ysize, char *filename);
		
		static void DrawTextString(int x, int y, char *str);
		static void reshape(int x, int y);
	private:
		int* m_argc;
		char** m_argv;
		
		static int m_windowSize_x;
		static int m_windowSize_y;
		int m_windowPosition_x;
		int m_windowPosition_y;

		char* m_windowTitle;

		static void(* m_displayFunc)(void);
		static void(* m_keyboardFunc)(unsigned char, int, int);


		float* calculateNormal( float *coord1, float *coord2, float *coord3 );


		float* Faces_Triangles;
		float* Faces_Quads;
		float* Vertex_Buffer;
		float* Normals;

		int TotalConnectedTriangles;	
		int TotalConnectedQuads;	
		int TotalConnectedPoints;
		int TotalFaces;

		static float m_human_x;
		static float m_human_y;
		static float m_human_z;

	};
}

#endif